-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NIT-2740] Horizontal Scaling of Validation Node #2354
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookin great so far! No comments. Just awaiting some tests so we can merge in
Co-authored-by: Raul Jordan <[email protected]>
Co-authored-by: Raul Jordan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome job! Do you know if there are metrics we can use to track the number of pending requests in grafana?
Good point, added a metric at consumer level for pending messages. We can use that to follow the load. |
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please sign the linked documents below to get yourself added. https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=b15c81cc-b5ea-42a6-9107-3992526f2898&env=na3&acct=6e152afc-6284-44af-a4c1-d8ef291db402&v=2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} else { | ||
serverAPI = NewExecutionServerAPI(arbSpawner, arbSpawner, arbConfigFetcher) | ||
serverAPI = NewExecutionServerAPI(arbSpawner, arbSpawner, redisSpawner, arbConfigFetcher) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sereverAPI is a thin struct that implements rpc endpoints (see it's usage in valAPI).
It doesn't need and shouldn't be aware of the redisSpawner.
redisSpawner belongs directly in ValidationNode struct, like redisConsumer
ApiAuth bool `koanf:"api-auth"` | ||
ApiPublic bool `koanf:"api-public"` | ||
Arbitrator server_arb.ArbitratorSpawnerConfig `koanf:"arbitrator" reload:"hot"` | ||
RedisExecRunner redis.ValidationServerConfig `koanf:"redis-exec-runner"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want a separate BOLD execution config?
I think we can use the existing config in arbConfigFetcher().RedisValidationServerConfig
There is a separate queue for BOLD with the same module root, so it makes sense to me that we only need one config, and if we really don't want BOLD we don't need to have a queue for it. This has the advantage of the same config being used in normal operations (validation queue) as in emergencies.
Not 100% certain, though.
}, nil | ||
} | ||
|
||
func (s *ExecutionSpawner) Start(ctx_in context.Context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be embedded into the "normal" redis consumer, possibly as a a separate StartBoldSpawner function that does the same and is called from the consumer's Start.
} | ||
|
||
func NewExecutionClient(config rpcclient.ClientConfigFetcher, stack *node.Node) *ExecutionClient { | ||
func NewExecutionClient(config rpcclient.ClientConfigFetcher, redisBoldValidationClientConfig *redis.ValidationClientConfig, stack *node.Node) *ExecutionClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boldValclient does not need to be a field of executionclient, they are separate beings.
ValidationServerConfigsList: "default", | ||
ValidationServer: rpcclient.DefaultClientConfig, | ||
RedisValidationClientConfig: redis.DefaultValidationClientConfig, | ||
RedisBoldValidationClientConfig: redis.DefaultValidationClientConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a separate one for BOLD or could we use the same one?
No description provided.